class MyMath{
    private float a;
    private float b;
     public MyMath(float a,float b){
        this.a = a;
        this.b = b;
    }
    void add(){
        if (a-(int)a==0 || b-(int)b==0) {
            System.out.println((int)(a + b));
        }else {
            System.out.println(a+b);
        }
    }
}
public class Test {
    public static void main(String[] args) {
        MyMath text1 = new MyMath(1000,12345);

    }
}
